﻿using System;
using GeoAPI.Geometries;

namespace NetTopologySuite.Geometries.Prepared
{
	internal class PreparedPolygonContains : AbstractPreparedPolygonContains
	{
		public static bool Contains(PreparedPolygon prep, IGeometry geom)
		{
			return new PreparedPolygonContains(prep).Contains(geom);
		}

		public PreparedPolygonContains(PreparedPolygon prepPoly) : base(prepPoly)
		{
		}

		public bool Contains(IGeometry geom)
		{
			return base.Eval(geom);
		}

		protected override bool FullTopologicalPredicate(IGeometry geom)
		{
			return this.prepPoly.Geometry.Contains(geom);
		}
	}
}
